package com.flnet.foxwash.service.impl;

import java.util.List;

import com.flnet.foxwash.domain.WMachine;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.flnet.foxwash.mapper.WShopMapper;
import com.flnet.foxwash.domain.WShop;
import com.flnet.foxwash.service.IWShopService;
import com.flnet.common.support.Convert;

/**
 * 店铺 服务层实现
 * 
 * @author flnet
 * @date 2019-03-20
 */
@Service
public class WShopServiceImpl implements IWShopService 
{
	@Autowired
	private WShopMapper wShopMapper;

	/**
     * 查询店铺信息
     * 
     * @param shopId 店铺ID
     * @return 店铺信息
     */
    @Override
	public WShop selectWShopById(Long shopId)
	{
	    return wShopMapper.selectWShopById(shopId);
	}
	
	/**
     * 查询店铺列表
     * 
     * @param wShop 店铺信息
     * @return 店铺集合
     */
	@Override
	public List<WShop> selectWShopList(WShop wShop)
	{
	    return wShopMapper.selectWShopList(wShop);
	}
	
    /**
     * 新增店铺
     * 
     * @param wShop 店铺信息
     * @return 结果
     */
	@Override
	public int insertWShop(WShop wShop)
	{
	    return wShopMapper.insertWShop(wShop);
	}
	
	/**
     * 修改店铺
     * 
     * @param wShop 店铺信息
     * @return 结果
     */
	@Override
	public int updateWShop(WShop wShop)
	{
	    return wShopMapper.updateWShop(wShop);
	}

	/**
     * 删除店铺对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
	@Override
	public int deleteWShopByIds(String ids)
	{
		return wShopMapper.deleteWShopByIds(Convert.toStrArray(ids));
	}

	/**
	 * 更新店铺状态
	 *
	 * @param wShop 需要更新店铺状态
	 * @return 结果
	 */
	@Override
	public int changeStatus(WShop wShop){
		return wShopMapper.updateWShop(wShop);
	}
	
}
